$(function () {
	/*回复评论 */
	$("#sendmsg").click(function() {
	   var retInputV = $('#retInputV').val();
	    if(retInputV == ''){
	    	sstb.dialog("请输入评论内容");
	    	return false;
	    }
	    layer.open({
	        type: 2
	        ,content: '正在发送'
	      });
	    $.ajax({
	        type: "POST",
	        url: '/operate/reply', 
	        dataType: "json",
	        data: {"touserid": userid,"id": id,"content": retInputV,articleid: article},
	        success: function (data) {
	        	if(data.code == 0){
	        		window.location.href="/h5comment/replylist?id=" + id;
	        	}else{
	        		if(data.code == 111){
	        			window.location.href="/signup"; 
	        		}else{
	        			sstb.dialog(data.msg);
	        		}
	        	}
	        },
	        error: function (xhr, type) {
	        	sstb.dialog("回复失败");
	        }
	    });

	})
	
})
